let yesBtn = document.getElementById("yes")
let noBtn = document.getElementById("no")

let questionText = document.getElementById("question")
let mainImage = document.getElementById("mainImage")



let clickCount = 0;  // 记录点击 No 的次数

// No 按钮的文字变化
const noTexts = [
    "达咩~",  
    "点这我会我伤心", 
    "求你别点",
    "再想想吧",
    "不要啊！",
    "真的吗？"
];
const noImages = [
    "images/wronged.png",
    "images/sad.png",
    "images/beg.png",
    "images/shock.png",
    "images/no.png",
    "images/really.png"
]


noBtn.addEventListener("click", function(){
    clickCount += 1;
    if (clickCount <= 6) {
        mainImage.src = noImages[clickCount - 1]
        noBtn.innerText = noTexts[clickCount - 1];
    }
    let yesSize = 1 + (clickCount * 1.2);
    yesBtn.style.transform = `scale(${yesSize})`;

    let noOffset = clickCount * 50;
    noBtn.style.transform = `translateX(${noOffset}px)`;
    let moveUp = clickCount * 25;
    mainImage.style.transform = `translateY(-${moveUp}px)`;
    questionText.style.transform = `translateY(-${moveUp}px)`;

})
// Yes 按钮点击后，进入表白成功页面
yesBtn.addEventListener("click", function() {
    document.body.innerHTML = `
        <div class="yes-screen">
            <p class="yes-text">爱你哟~！</p>
            <img src="images/happy.png" alt="拥抱" class="yes-image">
        </div>
    `;

    document.body.style.overflow = "hidden";
});